{template 'admin','header'}
<form method='post' action='{$self_url}' onsubmit='r_submit(this)'>
<input type="hidden" name="forward" value="{HTTP_REFERER}">
<input type="hidden" name="action" value="{$action}">
<table cellpadding="0" cellspacing="1" class="table_form">
    {if $action=='add'}
    <caption>添加站点</caption>
    {else}
    <caption>添加站点</caption>
    {/if}
    <tr>
        <th width="20%"><strong>站点名称</strong></th>
        <td><input type="text" name='data[sitename]' id='sitename' value='{$data['sitename']}'></td>
    </tr>
    <tr>
        <th width="20%"><strong>站点标识</strong></th>
        <td><input type="text" name='data[id]' id='id' value='{$data['id']}'></td>
    </tr>
    <tr>
        <th width="20%"><strong>访问地址</strong><br>反斜线结尾</th>
        <td><input type="text" name='data[url]' id='url' value='{$data['url']}'></td>
    </tr>
    <tr>
        <th width="20%"><strong>同步主体代码</strong></th>
        <td>{form::check_yesno('data[withcore]','withcore','',1,0,isset($data['withcore'])?$data['withcore']:0)}</td>
    </tr>
    <tr>
        <th width="20%"><strong>同步管理代码</strong></th>
        <td>{form::check_yesno('data[withadmin]','withadmin','',1,0,isset($data['withadmin'])?$data['withadmin']:0)}</td>
    </tr>
    <tr>
        <th width="20%"><strong>选择模块</strong></th>
        <td>{form::checkbox($modules,'data[modules]','modules',isset($data['modules'])?$data['modules']:'')}</td>
    </tr>
    <tr>
        <th width="20%"><strong>审核流程</strong></th>
        <td>
            {form::select($workflow_list,'data[workflowid]','workflowid',isset($data['workflowid'])?$data['workflowid']:'')}
        </td>
    </tr>
    <tr>
        <th width="20%"></th>
        <td><input type="submit" class="button_style" value="保存" name='dosubmit' /> <input type="button" class="button_style" value="返回" onclick="history.back()"/></td>
    </tr>
</table>
</form>
<div class="button_box"></div>
<div id="pages"></div>
{template 'admin','footer'}
